		$(function() {
			var tableSource = new $.jqx.dataAdapter({
				dataType: "json",
				dataFields:[
				    { name: "id", type: "int" },
				    { name: "msg", type: "string" },
				    { name: "read", type: "boolean" },
				    { name: "answer", type: "string" },
				    { name: "replytime", type: "date" },
			  	    { name: "createtime", type: "date" },
				    { name: "creator", type: "string" },
				    { name: "mender", type: "date" },
				    { name: "updatetime", type: "date" }
				],
				id: "id",
				url: "feedback/all.do"
			});
			$("#dataTable").jqxDataTable({
				width: "100%",
		        source: tableSource,
                pageable: true,
                pageSize: 15,
                pagerButtonsCount: 10,
                serverProcessing: true,
		        columnsResize: true,
		        sortable: true,
		        columns: [
		            { text: "序号", width: 50, cellsRenderer: function(row) { return (row + 1).toString(); } },
		            { text: "反馈内容", dataField: "msg", minWidth: 300 },
		            { text: "反馈者", dataField: "creator", width: 120 },
		            { text: "反馈时间", dataField: "createtime", width: 130,
		            	cellsRenderer: function(row, column, value, rowData) {
		            		return format(value, "Y-M-D H:I");
		            	}
		            },
		            { text: "状态", dataField: "read", width: 80, 
		            	cellsRenderer: function(row, column, value, rowData) { 
		            		return {"true":"已读","false":"未读"}[value]; 
		            	}
		            },
		            { text: "回复内容", dataField: "answer", minWidth: 300 },
		        ],
			});
			$("#dataTable").on("rowDoubleClick",function(info, args) {
				if(args && args.flag){
					info = args;
				}
				editingIndex = info.args.index;
				editingData = info.args.row;
			 	_editerIndex = layer.open({
					id: "feedbackEditer",
					title: "来自\"" + editingData.creator + "\"的反馈信息",
				    type: 1,
				    skin: 'layui-layer-rim',
				    area: ['1000px', '680px'],
				    content: 
		    			'<div id="feedback-editer" class="form" style="height: 100%;overflow: auto;">' +
		    		    '<input type="hidden" id="submit-url" value="feedback/reply.do" />' +
						'<input type="hidden" name="id" />' +
		    			'<label class="from-label" for="msg">反馈内容：</label>' +
		    			'<textarea name="msg" class="form-control" placeholder="反馈内容" style="width:820px;height:270px;resize:none;" readonly="true"></textarea>' +
		    			'<label class="from-label" for="answer">回复内容：</label>' +
		    			'<textarea name="answer" allowBlank="false" class="form-control" placeholder="回复内容" style="width:820px;height:280px;resize:none;"></textarea>' +
		    			'<br><br><br>' +
		    			'</div>' +
		    			'<div class="form" style="position: absolute;bottom: 0px;width: 100%;text-align: right;background-color: #DDD;">' +
		    			'<input type="button" class="btn btn-sm btn-success" onclick="submitEditer(this, true)" value="保存"/>' +
		    			'<input type="button" class="btn btn-sm btn-info" onclick="closeEditer(this)" value="返回"/>' +
		    			'</div>'
				});
			 	setData($("#feedback-editer"), editingData);
				$.ajax({
					url : "feedback/read.do",
					data : { ids : editingData.id },
					async : true,
					success : function(result) {
						if (result.code == 0) {
							updateRow($("#feedback-editer"),{ read: true });
						} else {
							layer.msg(result.msg || "", {
								offset : "5%",
								shift : 6
							});
						}
					}
				});
			});
		});